(function () {
  'use strict';

  define(['app', 
    'controllers/ListController', 
    'controllers/DetailController',
    'controllers/SlideShowCtrl',
    'controllers/NewMessage'], function (AMail) {
    AMail.config(['$routeProvider', function($routeProvider) {
      $routeProvider.when('/', {
        controller: 'ListController',
        templateUrl: '../templates/list.html'
      }).
      when("/view/:id", {
        controller: 'DetailController',
        templateUrl: '../templates/detail.html'
      }).
      when("/new", {
        controller: 'NewMessage',
        templateUrl: '../templates/new.html'
      }).
      when("/new/:time", {
        controller: 'NewMessage',
        templateUrl: '../templates/new.html'
      }).
      when("/slide", {
        controller: 'SlideShowCtrl',
        templateUrl: '../templates/slideshow.html'
      });
    }]);
  });

}).call(this);